package com.dzm.xgb.core.service;

import com.dzm.xgb.core.pojo.entity.BorrowInfo;
import com.dzm.xgb.core.pojo.entity.Lend;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dzm.xgb.core.pojo.entity.LendItem;
import com.dzm.xgb.core.pojo.vo.BorrowInfoApprovalVO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 标的准备表 服务类
 * </p>
 *
 * @author Dzm
 * @since 2024-08-27
 */
public interface LendService extends IService<Lend> {

    void createLend(BorrowInfoApprovalVO vo, BorrowInfo borrowInfo);

    List<Lend> getList();

    Map<String, Object> show(Long id);

    List<Lend> findAll();

    /**
     * 计算投资收益
     * @param invest
     * @param yearRate
     * @param totalmonth
     * @param returnMethod
     * @return
     */
    BigDecimal getInterestCount(BigDecimal invest, BigDecimal yearRate, Integer totalmonth, Integer returnMethod);

    /**
     * 放款
     * @param id
     */
    void makeLoan(Long id);

}
